package demo1;

public class Test {
    public static void main(String[] args) {
        int[] nums = {1,1,2};
        for (int i = 0, j = i + 1; j < nums.length; j++) {
            if (nums[i] != nums[j]) {
                i++;
            }
            nums[i] = nums[j];
        }
        //return i+1; 返回删完后的个数
        String str = "fgh";

    }
}
